--[[
-- @Author:      feilong
-- @DateTime:    2020-10-30 23:05:48
-- @Description: rabbit sub操作
	例子

    local sub = g.newServiceStart("rabbitsub.service") --rabbit mq
    g.sleep(200)
    local headers = {}
    headers["destination"] = "/queue/test"
    headers["app-id"] = "skynet_rabbitmq"
    headers["persistent"] = "true"
    headers["id"] = "skynet_rabbitmq_subcription"
    g.send(sub, headers)




]]

---------------------------------------------------------
-- class
---------------------------------------------------------
local M = class("rabbitsub")

function M:ctor(conf_name)
    g.handler = new("rabbitsub.handler", conf_name)

    self:register()
end

function M:register()
    g.dispatch:register('start', handler(self, self.onStart))
    g.dispatch:register('close', handler(self, self.onClose))
end

function M:onStart()
    return true
end

function M:onClose()
    return true
end

return M
